Integrand size = 21, antiderivative size = 72 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=-a^2 x-\frac {a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{d}+\frac {a^2 \tan ^3(c+d x)}{3 d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3971, 3554, 8, 2691, 3855, 2687, 30} \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{d}-a^2 x \]
[In]
[Out]
Rule 8
Rule 30
Rule 2687
Rule 2691
Rule 3554
Rule 3855
Rule 3971
Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 \tan ^2(c+d x)+2 a^2 \sec (c+d x) \tan ^2(c+d x)+a^2 \sec ^2(c+d x) \tan ^2(c+d x)\right ) \, dx \\ & = a^2 \int \tan ^2(c+d x) \, dx+a^2 \int \sec ^2(c+d x) \tan ^2(c+d x) \, dx+\left (2 a^2\right ) \int \sec (c+d x) \tan ^2(c+d x) \, dx \\ & = \frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{d}-a^2 \int 1 \, dx-a^2 \int \sec (c+d x) \, dx+\frac {a^2 \text {Subst}\left (\int x^2 \, dx,x,\tan (c+d x)\right )}{d} \\ & = -a^2 x-\frac {a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{d}+\frac {a^2 \tan ^3(c+d x)}{3 d} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.12 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {a^2 \arctan (\tan (c+d x))}{d}-\frac {a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{d}+\frac {a^2 \tan ^3(c+d x)}{3 d} \]
[In]
[Out]
Time = 0.80 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.28
method | result | size |
parts | \(\frac {a^{2} \left (\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a^{2} \tan \left (d x +c \right )^{3}}{3 d}+\frac {2 a^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(92\) |
derivativedivides | \(\frac {\frac {a^{2} \sin \left (d x +c \right )^{3}}{3 \cos \left (d x +c \right )^{3}}+2 a^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(93\) |
default | \(\frac {\frac {a^{2} \sin \left (d x +c \right )^{3}}{3 \cos \left (d x +c \right )^{3}}+2 a^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(93\) |
risch | \(-a^{2} x -\frac {2 i a^{2} \left (3 \,{\mathrm e}^{5 i \left (d x +c \right )}-6 \,{\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}-2\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(106\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.54 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {6 \, a^{2} d x \cos \left (d x + c\right )^{3} + 3 \, a^{2} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a^{2} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, a^{2} \cos \left (d x + c\right )^{2} + 3 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \sin \left (d x + c\right )}{6 \, d \cos \left (d x + c\right )^{3}} \]
[In]
[Out]
\[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=a^{2} \left (\int 2 \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \tan ^{2}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.15 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=\frac {2 \, a^{2} \tan \left (d x + c\right )^{3} - 6 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} - 3 \, a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{6 \, d} \]
[In]
[Out]
none
Time = 0.62 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.38 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {3 \, {\left (d x + c\right )} a^{2} + 3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {4 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{3 \, d} \]
[In]
[Out]
Time = 13.35 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.40 \[ \int (a+a \sec (c+d x))^2 \tan ^2(c+d x) \, dx=\frac {\frac {4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {2\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-a^2\,x \]
[In]
[Out]